#include <ctype.h>
#include <limits.h>
#include <math.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

#include "uthash.h"

#include <iso646.h>

int findMinDifference(char** timePoints, int timePointsSize);

int main()
{
	return 0;
}

int findMinDifference(char** timePoints, int timePointsSize)
{
	char freq[1450] = { 0 };
	for (int i = 0; i < timePointsSize; i++)
		if (freq[atoi(timePoints[i]) * 60 + atoi(timePoints[i] + 3)]++ == 1) return 0;
	int start = 0, end = 1440;
	for (;; start++) if (freq[start] > 0) break;
	for (;; end--) if (freq[end] > 0) break;

	int res = 1440;
	for (int i = start, last = start; i <= end; i++) {
		if (freq[i] == 0) continue;
		res = fmin(res, i - last);
		last = i;
	}
	return fmin(res, start + 1440 - end);
}
